const React = require('react');
const {
  View,
  StyleSheet,
} = require('react-native');
const {
  JDNetworkErrorView,
  JDRouter,
} = require('@areslabs/jdreact-core-lib');
const { NavigationBar } = JDRouter;

class JDNetworkErrorViewExample extends React.Component {
  render() {
    return (
      <View style={styles.wrapper}>
        <NavigationBar Title="网络请求失败" />
        <JDNetworkErrorView onRetry={this.onRetry} />
      </View>
    );
  }

  onRetry = () => {
    alert('重试')
  };
}

const styles = StyleSheet.create({
  wrapper: {
    flex: 1,
  },
});

module.exports = JDNetworkErrorViewExample;
